namespace GarageManagement.Data.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class AddCustomerTable : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.Customer",
                c => new
                    {
                        CustomerId = c.Guid(nullable: false),
                        CustomerCode = c.String(maxLength: 10),
                        IdNumber = c.String(maxLength: 10),
                        IdIssuer = c.String(maxLength: 255),
                        IdIssuedDate = c.DateTime(nullable: false),
                        FirstName = c.String(maxLength: 255),
                        LastName = c.String(maxLength: 255),
                        Birthday = c.DateTime(nullable: false),
                        Gender = c.Int(nullable: false),
                        Title = c.String(),
                        CustomerType = c.Int(nullable: false),
                        MemberSince = c.DateTime(nullable: false),
                        Telephone = c.String(maxLength: 15),
                        CellPhone = c.String(maxLength: 15),
                        Fax = c.String(maxLength: 15),
                        CreatedDate = c.DateTime(nullable: false),
                        UpdatedDate = c.DateTime(nullable: false),
                        CreatedBy = c.Guid(),
                        UpdatedBy = c.Guid(),
                        IsDeleted = c.Boolean(nullable: false),
                        Version = c.Binary(nullable: false, fixedLength: true, timestamp: true, storeType: "rowversion"),
                    })
                .PrimaryKey(t => t.CustomerId);
            
        }
        
        public override void Down()
        {
            DropTable("dbo.Customer");
        }
    }
}
